import httpFetch from 'share/httpFetch';

export default {

  getConfirmDataList(params) {
    return httpFetch.post(`/vendor-data-service/api/dispense/getDispenseByUser`, params);
  },

  confirmDispense(params) {
    return httpFetch.post(`/vendor-data-service/api/dispense/confirmDispense`, params);
  },

  getDispenseSumByUser(params) {
    return httpFetch.post(`/vendor-data-service/api/dispense/getDispenseSumByUser`, params);
  },

  getSettleByRecordId(dispenseType, dispenseId) {
    return httpFetch.get(`/vendor-data-service/api/dispense/${dispenseType}/getSettleByRecordId`, { dispenseId });
  },

  getConfirmReasonList(dispenseId) {
    return httpFetch.get(`/vendor-data-service/api/dispense/getConfirmReasonList`, { dispenseId });
  },

  getApportionDetail(params) {
    return httpFetch.post(`/vendor-data-service/api/order/query/settlement/apportion`, params);
  },

  saveApportionDetail(params) {
    return httpFetch.post(`/vendor-data-service/api/order/save/settlement/apportion`, params);
  },

  getApportionSetting(tenantId) {
    return httpFetch.get(`/vendor-data-service/api/config/settlement/apportion/search/by/tenantId`, { tenantId });
  }
};
